Marketing Preference XAPI
Exception Handling
Exception Handling:
- Custom Error handler is used to handle API Kit errors as well as user defined errors.
- HTTP endpoints have been configured with reconnection strategies with maximum of 3 retry attempts.
- Error gets captured and put into SQS error queue "cupa-marketing-preference-dlq" with error details and input message along with the transaction ID. Sample error message to error queue shown below.
{ "application": "cupa-marketing-preference-papi-dev", "transactionId": "a7287127-a8dd-4486-8a8b-513bfdd580a6", "error": { "error": { "type": "HTTP:INTERNAL_SERVER_ERROR", "message": "HTTP POST on resource 'http://mule-worker-internal-cupa-salesforce-sapi-dev.uk-e1.cloudhub.io:8091/api/compositeRequest' failed: internal server error (500)." } }, "message": [ { "sourceSystem": "File-Maker", "businessStream": "Academic", "firstName": "DR.", "lastName": "Strange", "emailId": "doctor.strange1@mule.com", "orcId": "0000-0000-0000-2002", "coreRefId": "", "createdDate": "2023-01-01", "grId": "123", "jobRole": [ "Author", "Lecturer" ], "institution": "Cambridge University", "countryName": "United Kingdom", "countryCode": "UK", "preferences": { "emailOptIn": "Opted-In", "emailOptInType": "Sales Soft Opt-In", "leadSource": "Commercial Relationship", "leadSourceDetails": "journal_author", "limitedUse": true, "communicationSubscriptions": [ ], "journalMnemonics": [ "ZYG", "CBC" ] }, "articles": [ { "edBoardId": "123627", "isActive": true, "journalMnemonic": "ZYG" } ] } ] }